<template>
    <div>
        <el-container style="border: 1px solid #eee">
            <el-header style="text-align: left; font-size: 12px">
                <span>{{title}}</span>
            </el-header>
        </el-container>
        <el-container>
            <el-aside class="el-aside-append">
                <el-menu style="border-right: 0;">
                    <router-link to="/dashboard">
                        <el-menu-item index="1"><i class="el-icon-menu"></i>控制台</el-menu-item>
                    </router-link>
                    <router-link to="/app">
                        <el-menu-item index="2"><i class="el-icon-news"></i>应用管理</el-menu-item>
                    </router-link>
                    <el-submenu index="3">
                        <template slot="title"><i class="el-icon-setting"></i>权限管理</template>
                        <el-menu-item index="3-1">角色管理</el-menu-item>
                        <el-menu-item index="3-2">权限管理</el-menu-item>
                    </el-submenu>
                </el-menu>
            </el-aside>
            <el-main>
                <router-view></router-view>
            </el-main>
        </el-container>
    </div>
</template>

<style>
  .el-header {
    background-color: #B3C0D1;
    color: #333;
    line-height: 60px;
  }
  .el-aside-append {
    color: #333;
    width: 150px;
    height: calc(100vh - 62px);
    border-right:solid 1px #e6e6e6;
  }
  ul>a {
    text-decoration: none;
  }
  .router-link-active {
    text-decoration: none;
  }
</style>

<script>
  export default {
    name: 'layout',
    props: ['title']
  };
</script>
